<?php

namespace App\Store\Controllers;

use App\Admin\Models\AdminMenu;
use App\Admin\Models\AdminUser;
use App\Admin\Services\AdminMenuRole;
use App\Common\Services\CommonExcelExport;
use App\Common\Services\Date\DateLunar;
use App\Common\Services\Date\TimerRange;
use App\Common\Services\Upload;
use Illuminate\Http\Request;

use App\Http\Controllers\Controller;
use App\Jobs\WxAccountMsg;
use App\Store\Models\Account\Account;
use App\Store\Models\Account\AccountMenu;
use App\Store\Models\Member\Member;
use App\Store\Models\Order\OrderSales;
use App\Store\Services\AccountMenuRole;
use App\Store\Services\Excel\DownloadTemp;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Maatwebsite\Excel\Facades\Excel;
class TestController extends Controller
{


    public function testrole(){
        // $list=Account::get()->toArray();
        // foreach($list as $val){
        //     if($val['type']!=9){
        //         $role=AccountMenuRole::setAccountRole($val['id'],$val['type']);
        //     }
            
           
        // }

        // $list=AdminUser::get()->toArray();
        // foreach($list as $val){
        //     if($val['type']!=1){
        //         $role=AdminMenuRole::setAdminRole($val['id'],$val['type']);
        //     }
            
           
        // }


    }

    public function dotestmenu(){
        $select_arr = ['id', 'pid','keyIndex', 'name', 'path', 'props','hidden', 'component', 'always_show', 'title', 'icon', 'no_cache', 'link', 'is_botton', 
             'is_default as is_checked'];
            $menulist = AccountMenu::where(['pid' => 0])
                ->select($select_arr)->get();
    
            $arr=[];
            foreach ($menulist as $val) {
                $arr[]=[
                    'title'=>$val['title']?$val['title']:$val['name'],
                    'title1'=>'',
                    'title2'=>'',
                    'button'=>'',
                ];
                $buttonList = AccountMenu::where(['pid' => $val->id, 'is_botton' => 1])->select($select_arr)->get();
                foreach($buttonList as $button_val1){
                    $arr[]=[
                        'title'=>$val['title']?$val['title']:$val['name'],
                        'title1'=>'',
                        'title2'=>'',
                        'button'=>$button_val1['name'],
                    ];
                }
                $submenu = AccountMenu::where(['pid' => $val->id, 'is_botton' => 0])->select($select_arr)->get();
                foreach ($submenu as $vval) {
                    

                    $arr[]=[
                        'title'=>$val['title']?$val['title']:$val['name'],
                        'title1'=>$vval['title']?$vval['title']:$vval['name'],
                        'title2'=>'',
                        'button'=>'',
                    ];


                    $vval_buttonList = AccountMenu::where(['pid' => $vval->id, 'is_botton' => 1])->select($select_arr)->get();
                    

                    foreach($vval_buttonList as $button_val2){
                        $arr[]=[
                            'title'=>$val['title']?$val['title']:$val['name'],
                            'title1'=>$vval['title']?$vval['title']:$vval['name'],
                            'title2'=>'',
                            'button'=>$button_val2['name'],
                        ];
                    }
                    
                    $subsubmenu = AccountMenu::where(['pid' => $vval->id, 'is_botton' => 0])->select($select_arr)->get();
                    foreach ($subsubmenu as $vvval) {

                        $arr[]=[
                            'title'=>$val['title']?$val['title']:$val['name'],
                            'title1'=>$vval['title']?$vval['title']:$vval['name'],
                            'title2'=>$vvval['title']?$vval['title']:$vvval['name'],
                            'button'=>'',
                        ];

                        
                        $vvval_buttonList = AccountMenu::where(['pid' => $vvval->id, 'is_botton' => 1])->select($select_arr)->get();
                       
                        foreach($vvval_buttonList as $button_val3){
                            $arr[]=[
                                'title'=>$val['title']?$val['title']:$val['name'],
                                'title1'=>$vval['title']?$vval['title']:$vval['name'],
                                'title2'=>$vvval['title']?$vval['title']:$vvval['name'],
                                'button'=>$button_val3['name'],
                            ];
                        }
                    }
                }
            }
            $row = [
                [
                    'title'=>'一级菜单',
                    'title1'=>'二级菜单',
                    'title2'=>'三级菜单',
                    'button'=>'按钮',
                ]
            ];
            $filename = '菜单导出_' . time() . '.xlsx';
            return Excel::download(new CommonExcelExport($row, $arr), $filename);
    }




    public function gettagdata(Request $request){

    //     $select_arr = ['id', 'pid', 'name', 'path', 'props','hidden', 'component', 'always_show', 'title', 'icon', 'no_cache', 'link', 'is_botton', 
    //     'is_default as is_checked'];
    //    $menulist = AdminMenu::where(['pid' => 0])
    //        ->select($select_arr)->get();

    //    $arr=[];
    //    foreach ($menulist as $val) {
    //        $arr[]=[
    //            'title'=>$val['title']?$val['title']:$val['name'],
    //            'title1'=>'',
    //            'button'=>'',
    //        ];
    //        $buttonList = AdminMenu::where(['pid' => $val->id, 'is_botton' => 1])->select($select_arr)->get();
    //        foreach($buttonList as $button_val1){
    //            $arr[]=[
    //                'title'=>$val['title']?$val['title']:$val['name'],
    //                'title1'=>'',
    //                'button'=>$button_val1['name'],
    //            ];
    //        }
    //        $submenu = AdminMenu::where(['pid' => $val->id, 'is_botton' => 0])->select($select_arr)->get();
    //        foreach ($submenu as $vval) {
               

    //            $arr[]=[
    //                'title'=>$val['title']?$val['title']:$val['name'],
    //                'title1'=>$vval['title']?$vval['title']:$vval['name'],
    //                'button'=>'',
    //            ];


    //            $vval_buttonList = AdminMenu::where(['pid' => $vval->id, 'is_botton' => 1])->select($select_arr)->get();
               

    //            foreach($vval_buttonList as $button_val2){
    //                $arr[]=[
    //                    'title'=>$val['title']?$val['title']:$val['name'],
    //                    'title1'=>$vval['title']?$vval['title']:$vval['name'],
    //                    'button'=>$button_val2['name'],
    //                ];
    //            }
               
               
    //        }
    //    }
    //    $row = [
    //        [
    //            'title'=>'一级菜单',
    //            'title1'=>'二级菜单',
    //            'button'=>'按钮',
    //        ]
    //    ];
    //    $filename = '超管菜单导出_' . time() . '.xlsx';
    //    return Excel::download(new CommonExcelExport($row, $arr), $filename);


        // $select_arr = ['id', 'pid','keyIndex', 'name', 'path', 'props','hidden', 'component', 'always_show', 'title', 'icon', 'no_cache', 'link', 'is_botton', 
        //      'is_default as is_checked'];
        //     $menulist = AccountMenu::where(['pid' => 0])
        //         ->select($select_arr)->get();
    
        //     $arr=[];
        //     foreach ($menulist as $val) {
        //         $arr[]=[
        //             'title'=>$val['title']?$val['title']:$val['name'],
        //             'title1'=>'',
        //             'title2'=>'',
        //             'button'=>'',
        //         ];
        //         $buttonList = AccountMenu::where(['pid' => $val->id, 'is_botton' => 1])->select($select_arr)->get();
        //         foreach($buttonList as $button_val1){
        //             $arr[]=[
        //                 'title'=>$val['title']?$val['title']:$val['name'],
        //                 'title1'=>'',
        //                 'title2'=>'',
        //                 'button'=>$button_val1['name'],
        //             ];
        //         }
        //         $submenu = AccountMenu::where(['pid' => $val->id, 'is_botton' => 0])->select($select_arr)->get();
        //         foreach ($submenu as $vval) {
                    

        //             $arr[]=[
        //                 'title'=>$val['title']?$val['title']:$val['name'],
        //                 'title1'=>$vval['title']?$vval['title']:$vval['name'],
        //                 'title2'=>'',
        //                 'button'=>'',
        //             ];


        //             $vval_buttonList = AccountMenu::where(['pid' => $vval->id, 'is_botton' => 1])->select($select_arr)->get();
                    

        //             foreach($vval_buttonList as $button_val2){
        //                 $arr[]=[
        //                     'title'=>$val['title']?$val['title']:$val['name'],
        //                     'title1'=>$vval['title']?$vval['title']:$vval['name'],
        //                     'title2'=>'',
        //                     'button'=>$button_val2['name'],
        //                 ];
        //             }
                    
        //             $subsubmenu = AccountMenu::where(['pid' => $vval->id, 'is_botton' => 0])->select($select_arr)->get();
        //             foreach ($subsubmenu as $vvval) {

        //                 $arr[]=[
        //                     'title'=>$val['title']?$val['title']:$val['name'],
        //                     'title1'=>$vval['title']?$vval['title']:$vval['name'],
        //                     'title2'=>$vvval['title']?$vvval['title']:$vvval['name'],
        //                     'button'=>'',
        //                 ];

                        
        //                 $vvval_buttonList = AccountMenu::where(['pid' => $vvval->id, 'is_botton' => 1])->select($select_arr)->get();
                       
        //                 foreach($vvval_buttonList as $button_val3){
        //                     $arr[]=[
        //                         'title'=>$val['title']?$val['title']:$val['name'],
        //                         'title1'=>$vval['title']?$vval['title']:$vval['name'],
        //                         'title2'=>$vvval['title']?$vvval['title']:$vvval['name'],
        //                         'button'=>$button_val3['name'],
        //                     ];
        //                 }
        //             }
        //         }
        //     }
        //     $row = [
        //         [
        //             'title'=>'一级菜单',
        //             'title1'=>'二级菜单',
        //             'title2'=>'三级菜单',
        //             'button'=>'按钮',
        //         ]
        //     ];
        //     $filename = '菜单导出_' . time() . '.xlsx';
        //     return Excel::download(new CommonExcelExport($row, $arr), $filename);

        // $this->dotestmenu();exit;
        $str= '{"Name":"Report","Width":"5cm","Layers":[{"Name":"default"}],"CustomProperties":[{"Name":"DisplayType","Value":"Page"},{"Name":"SizeType","Value":"Default"},{"Name":"PaperOrientation","Value":"Portrait"}],"Page":{"PageWidth":"5cm","PageHeight":"3.5cm","RightMargin":"0in","LeftMargin":"0in","TopMargin":"0in","BottomMargin":"0in","Columns":1,"ColumnSpacing":"0in"},"DataSources":[{"Name":"DataSource","ConnectionProperties":{"DataProvider":"JSONEMBED","ConnectString":"jsondata=[\\n    {\\n        \"二维码\": \"01;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a3\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12541\",      \\n        \"P/N\": \"10001\"    \\n    },\\n    {\\n        \"二维码\": \"02;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a4\",\\n        \"包装规格\": \"62人份/盒\",\\n        \"编码\": \"A12542\",      \\n        \"P/N\": \"10002\"    \\n    },\\n    {\\n        \"二维码\": \"03;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a5\",\\n        \"包装规格\": \"39人份/盒\",\\n        \"编码\": \"A12543\",      \\n        \"P/N\": \"10003\"    \\n    },\\n    {\\n        \"二维码\": \"04;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a6\",\\n        \"包装规格\": \"28人份/盒\",\\n        \"编码\": \"A12544\",      \\n        \"P/N\": \"10004\"    \\n    },\\n    {\\n        \"二维码\": \"05;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a7\",\\n        \"包装规格\": \"66人份/盒\",\\n        \"编码\": \"A12545\",      \\n        \"P/N\": \"10005\"    \\n    },\\n    {\\n        \"二维码\": \"06;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a8\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12546\",      \\n        \"P/N\": \"10006\"    \\n    },\\n    {\\n      \"二维码\": \"07;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a9\",\\n      \"包装规格\": \"112人份/盒\",\\n      \"编码\": \"A12547\",      \\n      \"P/N\": \"10007\"    \\n    },\\n    {\\n      \"二维码\": \"08;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a10\",\\n      \"包装规格\": \"99人份/盒\",\\n      \"编码\": \"A12548\",      \\n      \"P/N\": \"10008\"    \\n    },\\n    {\\n      \"二维码\": \"09;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a11\",\\n      \"包装规格\": \"48人份/盒\",\\n      \"编码\": \"A12549\",      \\n      \"P/N\": \"10009\"    \\n    },\\n    {\\n      \"二维码\": \"10;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a12\",\\n      \"包装规格\": \"88人份/盒\",\\n      \"编码\": \"A12550\",      \\n      \"P/N\": \"10010\"    \\n   },\\n    {\\n        \"二维码\": \"01;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a13\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12541\",      \\n        \"P/N\": \"10001\"    \\n    },\\n    {\\n        \"二维码\": \"02;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a14\",\\n        \"包装规格\": \"62人份/盒\",\\n        \"编码\": \"A12542\",      \\n        \"P/N\": \"10002\"    \\n    },\\n    {\\n        \"二维码\": \"03;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a15\",\\n        \"包装规格\": \"39人份/盒\",\\n        \"编码\": \"A12543\",      \\n        \"P/N\": \"10003\"    \\n    },\\n    {\\n        \"二维码\": \"04;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a16\",\\n        \"包装规格\": \"28人份/盒\",\\n        \"编码\": \"A12544\",      \\n        \"P/N\": \"10004\"    \\n    },\\n    {\\n        \"二维码\": \"05;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a17\",\\n        \"包装规格\": \"66人份/盒\",\\n        \"编码\": \"A12545\",      \\n        \"P/N\": \"10005\"    \\n    },\\n    {\\n        \"二维码\": \"06;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a18\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12546\",      \\n        \"P/N\": \"10006\"    \\n    },\\n    {\\n      \"二维码\": \"07;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a19\",\\n      \"包装规格\": \"112人份/盒\",\\n      \"编码\": \"A12547\",      \\n      \"P/N\": \"10007\"    \\n    },\\n    {\\n      \"二维码\": \"08;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a20\",\\n      \"包装规格\": \"99人份/盒\",\\n      \"编码\": \"A12548\",      \\n      \"P/N\": \"10008\"    \\n    },\\n    {\\n      \"二维码\": \"09;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a21\",\\n      \"包装规格\": \"48人份/盒\",\\n      \"编码\": \"A12549\",      \\n      \"P/N\": \"10009\"    \\n    },\\n    {\\n      \"二维码\": \"10;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a12\",\\n      \"包装规格\": \"88人份/盒\",\\n      \"编码\": \"A12550\",      \\n      \"P/N\": \"10010\"    \\n   },\\n    {\\n      \"二维码\": \"11;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a22\",\\n      \"包装规格\": \"75人份/盒\",\\n      \"编码\": \"A12551\",      \\n      \"P/N\": \"10011\"    \\n    },\\n    {\\n      \"二维码\": \"12;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a23\",\\n      \"包装规格\": \"58人份/盒\",\\n      \"编码\": \"A12552\",      \\n      \"P/N\": \"10012\"    \\n    },\\n    {\\n        \"二维码\": \"02;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a24\",\\n        \"包装规格\": \"62人份/盒\",\\n        \"编码\": \"A12542\",      \\n        \"P/N\": \"10002\"    \\n    },\\n    {\\n        \"二维码\": \"03;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a25\",\\n        \"包装规格\": \"39人份/盒\",\\n        \"编码\": \"A12543\",      \\n        \"P/N\": \"10003\"    \\n    },\\n    {\\n        \"二维码\": \"04;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a26\",\\n        \"包装规格\": \"28人份/盒\",\\n        \"编码\": \"A12544\",      \\n        \"P/N\": \"10004\"    \\n    },\\n    {\\n        \"二维码\": \"05;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a27\",\\n        \"包装规格\": \"66人份/盒\",\\n        \"编码\": \"A12545\",      \\n        \"P/N\": \"10005\"    \\n    },\\n    {\\n        \"二维码\": \"06;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a28\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12546\",      \\n        \"P/N\": \"10006\"    \\n    },\\n    {\\n      \"二维码\": \"07;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a29\",\\n      \"包装规格\": \"112人份/盒\",\\n      \"编码\": \"A12547\",      \\n      \"P/N\": \"10007\"    \\n    },\\n    {\\n      \"二维码\": \"08;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a10\",\\n      \"包装规格\": \"99人份/盒\",\\n      \"编码\": \"A12548\",      \\n      \"P/N\": \"10008\"    \\n    },\\n    {\\n      \"二维码\": \"09;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a31\",\\n      \"包装规格\": \"48人份/盒\",\\n      \"编码\": \"A12549\",      \\n      \"P/N\": \"10009\"    \\n    },\\n    {\\n      \"二维码\": \"10;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a32\",\\n      \"包装规格\": \"88人份/盒\",\\n      \"编码\": \"A12550\",      \\n      \"P/N\": \"10010\"    \\n   },\\n    {\\n        \"二维码\": \"01;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a33\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12541\",      \\n        \"P/N\": \"10001\"    \\n    },\\n    {\\n        \"二维码\": \"02;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a34\",\\n        \"包装规格\": \"62人份/盒\",\\n        \"编码\": \"A12542\",      \\n        \"P/N\": \"10002\"    \\n    },\\n    {\\n        \"二维码\": \"03;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a35\",\\n        \"包装规格\": \"39人份/盒\",\\n        \"编码\": \"A12543\",      \\n        \"P/N\": \"10003\"    \\n    },\\n    {\\n        \"二维码\": \"04;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a36\",\\n        \"包装规格\": \"28人份/盒\",\\n        \"编码\": \"A12544\",      \\n        \"P/N\": \"10004\"    \\n    },\\n    {\\n        \"二维码\": \"05;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a37\",\\n        \"包装规格\": \"66人份/盒\",\\n        \"编码\": \"A12545\",      \\n        \"P/N\": \"10005\"    \\n    },\\n    {\\n        \"二维码\": \"06;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a38\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12546\",      \\n        \"P/N\": \"10006\"    \\n    },\\n    {\\n      \"二维码\": \"07;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a39\",\\n      \"包装规格\": \"112人份/盒\",\\n      \"编码\": \"A12547\",      \\n      \"P/N\": \"10007\"    \\n    },\\n    {\\n      \"二维码\": \"08;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a40\",\\n      \"包装规格\": \"99人份/盒\",\\n      \"编码\": \"A12548\",      \\n      \"P/N\": \"10008\"    \\n    },\\n    {\\n      \"二维码\": \"09;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a41\",\\n      \"包装规格\": \"48人份/盒\",\\n      \"编码\": \"A12549\",      \\n      \"P/N\": \"10009\"    \\n    },\\n    {\\n      \"二维码\": \"10;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a42\",\\n      \"包装规格\": \"88人份/盒\",\\n      \"编码\": \"A12550\",      \\n      \"P/N\": \"10010\"    \\n   },\\n    {\\n      \"二维码\": \"11;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a43\",\\n      \"包装规格\": \"75人份/盒\",\\n      \"编码\": \"A12551\",      \\n      \"P/N\": \"10011\"    \\n    },\\n    {\\n      \"二维码\": \"12;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a44\",\\n      \"包装规格\": \"58人份/盒\",\\n      \"编码\": \"A12552\",      \\n      \"P/N\": \"10012\"    \\n    },\\n\\n    {\\n        \"二维码\": \"01;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a53\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12541\",      \\n        \"P/N\": \"10001\"    \\n    },\\n    {\\n        \"二维码\": \"02;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a54\",\\n        \"包装规格\": \"62人份/盒\",\\n        \"编码\": \"A12542\",      \\n        \"P/N\": \"10002\"    \\n    },\\n    {\\n        \"二维码\": \"03;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a55\",\\n        \"包装规格\": \"39人份/盒\",\\n        \"编码\": \"A12543\",      \\n        \"P/N\": \"10003\"    \\n    },\\n    {\\n        \"二维码\": \"04;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a56\",\\n        \"包装规格\": \"28人份/盒\",\\n        \"编码\": \"A12544\",      \\n        \"P/N\": \"10004\"    \\n    },\\n    {\\n        \"二维码\": \"05;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a57\",\\n        \"包装规格\": \"66人份/盒\",\\n        \"编码\": \"A12545\",      \\n        \"P/N\": \"10005\"    \\n    },\\n    {\\n        \"二维码\": \"06;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a58\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12546\",      \\n        \"P/N\": \"10006\"    \\n    },\\n    {\\n      \"二维码\": \"07;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a59\",\\n      \"包装规格\": \"112人份/盒\",\\n      \"编码\": \"A12547\",      \\n      \"P/N\": \"10007\"    \\n    },\\n    {\\n      \"二维码\": \"08;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a60\",\\n      \"包装规格\": \"99人份/盒\",\\n      \"编码\": \"A12548\",      \\n      \"P/N\": \"10008\"    \\n    },\\n    {\\n      \"二维码\": \"09;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a61\",\\n      \"包装规格\": \"48人份/盒\",\\n      \"编码\": \"A12549\",      \\n      \"P/N\": \"10009\"    \\n    },\\n    {\\n      \"二维码\": \"10;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a62\",\\n      \"包装规格\": \"88人份/盒\",\\n      \"编码\": \"A12550\",      \\n      \"P/N\": \"10010\"    \\n   },\\n    {\\n        \"二维码\": \"01;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a63\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12541\",      \\n        \"P/N\": \"10001\"    \\n    },\\n    {\\n        \"二维码\": \"02;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a64\",\\n        \"包装规格\": \"62人份/盒\",\\n        \"编码\": \"A12542\",      \\n        \"P/N\": \"10002\"    \\n    },\\n    {\\n        \"二维码\": \"03;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a65\",\\n        \"包装规格\": \"39人份/盒\",\\n        \"编码\": \"A12543\",      \\n        \"P/N\": \"10003\"    \\n    },\\n    {\\n        \"二维码\": \"04;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a66\",\\n        \"包装规格\": \"28人份/盒\",\\n        \"编码\": \"A12544\",      \\n        \"P/N\": \"10004\"    \\n    },\\n    {\\n        \"二维码\": \"05;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a67\",\\n        \"包装规格\": \"66人份/盒\",\\n        \"编码\": \"A12545\",      \\n        \"P/N\": \"10005\"    \\n    },\\n    {\\n        \"二维码\": \"06;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a68\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12546\",      \\n        \"P/N\": \"10006\"    \\n    },\\n    {\\n      \"二维码\": \"07;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a69\",\\n      \"包装规格\": \"112人份/盒\",\\n      \"编码\": \"A12547\",      \\n      \"P/N\": \"10007\"    \\n    },\\n    {\\n      \"二维码\": \"08;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a70\",\\n      \"包装规格\": \"99人份/盒\",\\n      \"编码\": \"A12548\",      \\n      \"P/N\": \"10008\"    \\n    },\\n    {\\n      \"二维码\": \"09;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a71\",\\n      \"包装规格\": \"48人份/盒\",\\n      \"编码\": \"A12549\",      \\n      \"P/N\": \"10009\"    \\n    },\\n    {\\n      \"二维码\": \"10;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a72\",\\n      \"包装规格\": \"88人份/盒\",\\n      \"编码\": \"A12550\",      \\n      \"P/N\": \"10010\"    \\n   },\\n    {\\n      \"二维码\": \"11;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a73\",\\n      \"包装规格\": \"75人份/盒\",\\n      \"编码\": \"A12551\",      \\n      \"P/N\": \"10011\"    \\n    },\\n    {\\n      \"二维码\": \"12;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a74\",\\n      \"包装规格\": \"58人份/盒\",\\n      \"编码\": \"A12552\",      \\n      \"P/N\": \"10012\"    \\n    },\\n\\n    {\\n        \"二维码\": \"01;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b683\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12541\",      \\n        \"P/N\": \"10001\"    \\n    },\\n    {\\n        \"二维码\": \"02;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b684\",\\n        \"包装规格\": \"62人份/盒\",\\n        \"编码\": \"A12542\",      \\n        \"P/N\": \"10002\"    \\n    },\\n    {\\n        \"二维码\": \"03;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a85\",\\n        \"包装规格\": \"39人份/盒\",\\n        \"编码\": \"A12543\",      \\n        \"P/N\": \"10003\"    \\n    },\\n    {\\n        \"二维码\": \"04;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a86\",\\n        \"包装规格\": \"28人份/盒\",\\n        \"编码\": \"A12544\",      \\n        \"P/N\": \"10004\"    \\n    },\\n    {\\n        \"二维码\": \"05;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a87\",\\n        \"包装规格\": \"66人份/盒\",\\n        \"编码\": \"A12545\",      \\n        \"P/N\": \"10005\"    \\n    },\\n    {\\n        \"二维码\": \"06;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a88\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12546\",      \\n        \"P/N\": \"10006\"    \\n    },\\n    {\\n      \"二维码\": \"07;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a89\",\\n      \"包装规格\": \"112人份/盒\",\\n      \"编码\": \"A12547\",      \\n      \"P/N\": \"10007\"    \\n    },\\n    {\\n      \"二维码\": \"08;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a90\",\\n      \"包装规格\": \"99人份/盒\",\\n      \"编码\": \"A12548\",      \\n      \"P/N\": \"10008\"    \\n    },\\n    {\\n      \"二维码\": \"09;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a91\",\\n      \"包装规格\": \"48人份/盒\",\\n      \"编码\": \"A12549\",      \\n      \"P/N\": \"10009\"    \\n    },\\n    {\\n      \"二维码\": \"10;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a92\",\\n      \"包装规格\": \"88人份/盒\",\\n      \"编码\": \"A12550\",      \\n      \"P/N\": \"10010\"    \\n   },\\n    {\\n        \"二维码\": \"01;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a93\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12541\",      \\n        \"P/N\": \"10001\"    \\n    },\\n    {\\n        \"二维码\": \"02;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a94\",\\n        \"包装规格\": \"62人份/盒\",\\n        \"编码\": \"A12542\",      \\n        \"P/N\": \"10002\"    \\n    },\\n    {\\n        \"二维码\": \"03;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a95\",\\n        \"包装规格\": \"39人份/盒\",\\n        \"编码\": \"A12543\",      \\n        \"P/N\": \"10003\"    \\n    },\\n    {\\n        \"二维码\": \"04;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a96\",\\n        \"包装规格\": \"28人份/盒\",\\n        \"编码\": \"A12544\",      \\n        \"P/N\": \"10004\"    \\n    },\\n    {\\n        \"二维码\": \"05;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a97\",\\n        \"包装规格\": \"66人份/盒\",\\n        \"编码\": \"A12545\",      \\n        \"P/N\": \"10005\"    \\n    },\\n    {\\n        \"二维码\": \"06;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a98\",\\n        \"包装规格\": \"48人份/盒\",\\n        \"编码\": \"A12546\",      \\n        \"P/N\": \"10006\"    \\n    },\\n    {\\n      \"二维码\": \"07;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a99\",\\n      \"包装规格\": \"112人份/盒\",\\n      \"编码\": \"A12547\",      \\n      \"P/N\": \"10007\"    \\n    },\\n    {\\n      \"二维码\": \"08;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a100\",\\n      \"包装规格\": \"99人份/盒\",\\n      \"编码\": \"A12548\",      \\n      \"P/N\": \"10008\"    \\n    },\\n    {\\n      \"二维码\": \"09;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a101\",\\n      \"包装规格\": \"48人份/盒\",\\n      \"编码\": \"A12549\",      \\n      \"P/N\": \"10009\"    \\n    },\\n    {\\n      \"二维码\": \"10;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a102\",\\n      \"包装规格\": \"88人份/盒\",\\n      \"编码\": \"A12550\",      \\n      \"P/N\": \"10010\"    \\n   },\\n    {\\n      \"二维码\": \"11;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a103\",\\n      \"包装规格\": \"75人份/盒\",\\n      \"编码\": \"A12551\",      \\n      \"P/N\": \"10011\"    \\n    },\\n    {\\n      \"二维码\": \"12;1012;11;17210630;971;98071d7470-5e84-409d-8115-bb5388d2b6a104\",\\n      \"包装规格\": \"58人份/盒\",\\n      \"编码\": \"A12552\",      \\n      \"P/N\": \"10012\"    \\n    }\\n  ]"}}],"FixedPage":{"Pages":[{"ReportItems":[{"Type":"textbox","Name":"文本框1","KeepTogether":true,"Value":"EB病毒早期抗原(EA)  I gA抗体","Style":{"FontFamily":"微软雅黑","FontSize":"9pt","FontWeight":"Bold","PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt","TextAlign":"Center"},"Left":"0.009cm","Top":"0cm","Width":"4.991cm","Height":"0.7cm"},{"Type":"barcode","Name":"条形码1","ZIndex":1,"Value":"=Fields!二维码.Value","Symbology":"QRCode","QuietZone":{"Left":"0cm","Right":"0cm","Top":"0cm","Bottom":"0cm"},"SupplementOptions":{"Spacing":"0cm"},"Style":{"FontFamily":"微软雅黑"},"Left":"0.2cm","Top":"1.1cm","Width":"1.8cm","Height":"1.8cm"},{"Type":"textbox","Name":"文本框2","ZIndex":2,"KeepTogether":true,"Value":"检测试剂","Style":{"FontFamily":"微软雅黑","FontSize":"9pt","FontWeight":"Bold","PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt","TextAlign":"Center"},"Left":"0.2cm","Top":"0.496cm","Width":"1.8cm","Height":"0.6cm"},{"Type":"textbox","Name":"文本框3","ZIndex":3,"KeepTogether":true,"Value":"包装规格：","Style":{"FontFamily":"微软雅黑","FontSize":"8pt","PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt","TextAlign":"Center"},"Left":"1.998cm","Top":"0.998cm","Width":"1.8cm","Height":"0.5cm"},{"Type":"textbox","Name":"文本框4","ZIndex":4,"KeepTogether":true,"Value":"=Fields!包装规格.Value","Style":{"FontFamily":"微软雅黑","FontSize":"8pt","PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt"},"Left":"3.5cm","Top":"0.999cm","Width":"1.499cm","Height":"0.5cm"},{"Type":"textbox","Name":"文本框5","ZIndex":5,"KeepTogether":true,"Value":"LOT:","Style":{"Border":{"Width":"0.5pt"},"FontFamily":"微软雅黑","FontSize":"8pt","PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt","TextAlign":"Center","VerticalAlign":"Middle"},"Left":"2.008cm","Top":"1.5cm","Width":"0.4594in","Height":"0.5cm"},{"Type":"textbox","Name":"文本框6","ZIndex":6,"KeepTogether":true,"Value":"=Fields!编码.Value","Style":{"FontFamily":"微软雅黑","FontSize":"8pt","PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt"},"Left":"2.993cm","Top":"1.5cm","Width":"1.499cm","Height":"0.5cm"},{"Type":"textbox","Name":"文本框7","ZIndex":7,"KeepTogether":true,"Value":"时间：","Style":{"Border":{"Width":"0.5pt"},"FontFamily":"微软雅黑","FontSize":"8pt","PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt","TextAlign":"Center","VerticalAlign":"Middle"},"Left":"2.006cm","Top":"2.007cm","Width":"1.392cm","Height":"0.5cm"},{"Type":"textbox","Name":"文本框8","ZIndex":8,"KeepTogether":true,"Value":"=Now()","Style":{"FontFamily":"微软雅黑","FontSize":"8pt","PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt"},"Left":"2.9cm","Top":"2.007cm","Width":"2.1cm","Height":"0.5cm"},{"Type":"textbox","Name":"文本框9","ZIndex":9,"KeepTogether":true,"Value":"P/N：","Style":{"Border":{"Width":"0.5pt"},"FontFamily":"微软雅黑","FontSize":"8pt","PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt","TextAlign":"Center","VerticalAlign":"Middle"},"Left":"2.008cm","Top":"2.49cm","Width":"1.39cm","Height":"0.5cm"},{"Type":"textbox","Name":"文本框10","ZIndex":10,"KeepTogether":true,"Value":"=Fields.Item(\"P/N\").Value","Style":{"FontFamily":"微软雅黑","FontSize":"8pt","PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt"},"Left":"2.9cm","Top":"2.49cm","Width":"2.1cm","Height":"0.5cm"}]}],"Group":{"Name":"固定页面_分组1","GroupExpressions":["=Fields!二维码.Value"]},"DataSetName":"DataSet"},"DataSets":[{"Name":"DataSet","Fields":[{"Name":"二维码","DataField":"二维码"},{"Name":"包装规格","DataField":"包装规格"},{"Name":"编码","DataField":"编码"},{"Name":"P/N","DataField":"P/N"}],"Query":{"DataSourceName":"DataSource","CommandText":"jpath=$.[*]"},"CaseSensitivity":"Auto","KanatypeSensitivity":"Auto","AccentSensitivity":"Auto","WidthSensitivity":"Auto"}]}';
        //$str='{"Name":"Report","Width":"5cm","Layers":[{"Name":"default"}],"CustomProperties":[{"Name":"DisplayType","Value":"Page"},{"Name":"SizeType","Value":"Default"},{"Name":"PaperOrientation","Value":"Portrait"}],"Page":{"PageWidth":"5cm","PageHeight":"3.5cm","RightMargin":"0in","LeftMargin":"0in","TopMargin":"0in","BottomMargin":"0in","Columns":1,"ColumnSpacing":"0in"},"FixedPage":{"Pages":[{"Width":"3cm","Height":"5cm"}]}}';


        //$str='{"Name":"Report","Width":"5cm","Layers":[{"Name":"default"}],"CustomProperties":[{"Name":"DisplayType","Value":"Page"},{"Name":"SizeType","Value":"Default"},{"Name":"PaperOrientation","Value":"Portrait"}],"Page":{"PageWidth":"5cm","PageHeight":"3.5cm","RightMargin":"0in","LeftMargin":"0in","TopMargin":"0in","BottomMargin":"0in","Columns":1,"ColumnSpacing":"0in"},"DataSources":[{"Name":"DataSource","ConnectionProperties":{"DataProvider":"JSONEMBED","ConnectString":"jsondata=[{\\n        \"证书号\": \"\",\\n        \"精度\": \"\",\\n        \"颜色\": \"\",\\n        \"工费\": 0.00,\\n        \"工费单价\": 0.00,\\n        \"商品条码\": \"SLP123456\",\\n        \"商品名称\": \"纯金手镯\",\\n        \"主石重\": \"0.000\",\\n        \"副石重\": \"0.000\",\\n        \"标签价\": 100.00,\\n        \"重量\": \"20.800\",\\n        \"圈号\": \"12\",\\n        \"含量\": \"10\"\\n}]"}}],"FixedPage":{"Pages":[{"Width":"3cm","Height":"5cm"}]},"DataSets":[{"Name":"DataSet","Fields":[{"Name":"证书号","DataField":"证书号"},{"Name":"精度","DataField":"精度"},{"Name":"颜色","DataField":"颜色"},{"Name":"工费","DataField":"工费"},{"Name":"工费单价","DataField":"工费单价"},{"Name":"商品条码","DataField":"商品条码"},{"Name":"商品名称","DataField":"商品名称"},{"Name":"主石重","DataField":"主石重"},{"Name":"副石重","DataField":"副石重"},{"Name":"标签价","DataField":"标签价"},{"Name":"重量","DataField":"重量"},{"Name":"圈号","DataField":"圈号"},{"Name":"含量","DataField":"含量"}],"Query":{"DataSourceName":"DataSource","CommandText":"jpath=$.[*]"},"CaseSensitivity":"Auto","KanatypeSensitivity":"Auto","AccentSensitivity":"Auto","WidthSensitivity":"Auto"}]}';

        //$str='{"Name":"Report1","Width":"5cm","Layers":[{"Name":"default"}],"CustomProperties":[{"Name":"DisplayType","Value":"Page"},{"Name":"SizeType","Value":"Default"},{"Name":"PaperOrientation","Value":"Portrait"},{"Name":"CollapseWhiteSpace","Value":"True"}],"Page":{"PageWidth":"5cm","PageHeight":"3.5cm","RightMargin":"0in","LeftMargin":"0in","TopMargin":"0in","BottomMargin":"0in","Columns":1,"ColumnSpacing":"0in"},"DataSources":[{"Name":"DataSource","ConnectionProperties":{"DataProvider":"JSONEMBED","ConnectString":"jsondata=[{\n        \"证书号\": \"\",\n        \"精度\": \"\",\n        \"颜色\": \"\",\n        \"工费\": 0.00,\n        \"工费单价\": 0.00,\n        \"商品条码\": \"SLP123456\",\n        \"商品名称\": \"纯金手镯\",\n        \"主石重\": \"0.000\",\n        \"副石重\": \"0.000\",\n        \"标签价\": 100.00,\n        \"重量\": \"20.800\",\n        \"圈号\": \"12\",\n        \"含量\": \"10\"\n}]"}}],"FixedPage":{"Pages":[{"ReportItems":[{"Type":"textbox","Name":"商品","CanGrow":true,"KeepTogether":true,"Value":"商品名","Style":{"PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt"},"Width":"0.5417in","Height":"0.25in"},{"Type":"textbox","Name":"文本框1","ZIndex":1,"CanGrow":true,"KeepTogether":true,"Value":"=Fields!商品名称.Value","Style":{"PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt"},"Left":"0.5625in","Width":"0.6186in","Height":"0.25in"},{"Type":"textbox","Name":"文本框2","ZIndex":2,"CanGrow":true,"KeepTogether":true,"Value":"=Fields!商品条码.Value","Style":{"PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt"},"Left":"0.0521in","Top":"0.3854in","Width":"1in","Height":"0.25in"},{"Type":"barcode","Name":"Barcode1","ZIndex":3,"Value":"=Fields!商品条码.Value","Symbology":"Code_128auto","Style":{"FontFamily":"Courier New","FontSize":"8pt"},"Left":"0.0313in","Top":"1.6772in","Width":"1.1146in","Height":"0.25in"}],"Width":"3cm","Height":"5cm"}],"DataSetName":"DataSet"},"DataSets":[{"Name":"DataSet","Fields":[{"Name":"证书号","DataField":"证书号"},{"Name":"精度","DataField":"精度"},{"Name":"颜色","DataField":"颜色"},{"Name":"工费","DataField":"工费"},{"Name":"工费单价","DataField":"工费单价"},{"Name":"商品条码","DataField":"商品条码"},{"Name":"商品名称","DataField":"商品名称"},{"Name":"主石重","DataField":"主石重"},{"Name":"副石重","DataField":"副石重"},{"Name":"标签价","DataField":"标签价"},{"Name":"重量","DataField":"重量"},{"Name":"圈号","DataField":"圈号"},{"Name":"含量","DataField":"含量"}],"Query":{"DataSourceName":"DataSource","CommandText":"jpath=$.[*]"},"CaseSensitivity":"Auto","KanatypeSensitivity":"Auto","AccentSensitivity":"Auto","WidthSensitivity":"Auto"}]}';

        $str='{"Name":"Report1","Width":"5cm","Layers":[{"Name":"default"}],"CustomProperties":[{"Name":"DisplayType","Value":"Page"},{"Name":"SizeType","Value":"Default"},{"Name":"PaperOrientation","Value":"Portrait"},{"Name":"CollapseWhiteSpace","Value":"True"}],"Page":{"PageWidth":"5cm","PageHeight":"3.5cm","RightMargin":"0in","LeftMargin":"0in","TopMargin":"0in","BottomMargin":"0in","Columns":1,"ColumnSpacing":"0in"},"DataSources":[{"Name":"DataSource","ConnectionProperties":{"DataProvider":"JSONEMBED","ConnectString":"jsondata=[{\n        \"证书号\": \"\",\n        \"精度\": \"\",\n        \"颜色\": \"\",\n        \"工费\": 0.00,\n        \"工费单价\": 0.00,\n        \"商品条码\": \"SLP123456\",\n        \"商品名称\": \"纯金手镯\",\n        \"主石重\": \"0.000\",\n        \"副石重\": \"0.000\",\n        \"标签价\": 100.00,\n        \"重量\": \"20.800\",\n        \"圈号\": \"12\",\n        \"含量\": \"10\"\n}]"}}],"FixedPage":{"Pages":[{"ReportItems":[{"Type":"textbox","Name":"商品","CanGrow":true,"KeepTogether":true,"Value":"商品名","Style":{"PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt"},"Width":"0.5417in","Height":"0.25in"},{"Type":"textbox","Name":"文本框1","ZIndex":1,"CanGrow":true,"KeepTogether":true,"Value":"=Fields!商品名称.Value","Style":{"PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt"},"Left":"0.5625in","Width":"0.6186in","Height":"0.25in"},{"Type":"textbox","Name":"文本框2","ZIndex":2,"CanGrow":true,"KeepTogether":true,"Value":"=Fields!商品条码.Value","Style":{"PaddingLeft":"2pt","PaddingRight":"2pt","PaddingTop":"2pt","PaddingBottom":"2pt"},"Left":"0.0521in","Top":"0.3854in","Width":"1in","Height":"0.25in"},{"Type":"barcode","Name":"Barcode1","ZIndex":3,"Value":"=Fields!商品条码.Value","Symbology":"Code_128auto","Style":{"FontFamily":"Courier New","FontSize":"8pt"},"Left":"0.0313in","Top":"1.6772in","Width":"1.1146in","Height":"0.25in"}],"Width":"3cm","Height":"5cm"}],"Group":{"Name":"条码分组","GroupExpressions":["=Fields!商品条码.Value"]},"DataSetName":"DataSet"},"DataSets":[{"Name":"DataSet","Fields":[{"Name":"证书号","DataField":"证书号"},{"Name":"精度","DataField":"精度"},{"Name":"颜色","DataField":"颜色"},{"Name":"工费","DataField":"工费"},{"Name":"工费单价","DataField":"工费单价"},{"Name":"商品条码","DataField":"商品条码"},{"Name":"商品名称","DataField":"商品名称"},{"Name":"主石重","DataField":"主石重"},{"Name":"副石重","DataField":"副石重"},{"Name":"标签价","DataField":"标签价"},{"Name":"重量","DataField":"重量"},{"Name":"圈号","DataField":"圈号"},{"Name":"含量","DataField":"含量"}],"Query":{"DataSourceName":"DataSource","CommandText":"jpath=$.[*]"},"CaseSensitivity":"Auto","KanatypeSensitivity":"Auto","AccentSensitivity":"Auto","WidthSensitivity":"Auto"}]}';
    // echo json_encode(json_decode($str,true));exit;
    return response()->json(json_decode($str,true));
    }
    public function dotest(Request $request){
        $this->dostoremenu();exit;
        $this->doadminmenu();exit;
        $list = DB::select('show tables');
        $list=array_column($list,'Tables_in_zhuxiaobao');
        print_r($list);
        //DB::statement("ALTER TABLE `users` ADD `phone_number` VARCHAR(255) AFTER `email`");
 
        exit;

        OrderSales::leftJoin((new Member())->getTable(),(new OrderSales())->getTable().'.mem_id', '=', (new Member())->getTable().'.id')->where([[(new OrderSales())->getTable().'.cp_id',1],[(new OrderSales())->getTable().'.audit_status',2]])->count();
        exit;
        // AccountMenuRole::setAccountRole(0);exit;

        
        
        echo Carbon::createFromTimestamp(time())->format('Y-m-d\TH:i:sP');  exit;

        // function copyTableWithData($originalTable, $newTable)
        // {
        //     DB::statement("CREATE TABLE $newTable LIKE $originalTable");
        //     DB::statement("INSERT $newTable SELECT * FROM $originalTable");
        // }
        
        // // 使用方法
        // copyTableWithData('zxb_site_wxapp_swimg', 'zxb_site_wxapp_swimg_new');
        

        $twoDArray = [
            ['id' => 2, 'name' => 'Alice', 'age' => 25],
            ['id' => 2, 'name' => 'Bob', 'age' => 30],
            ['id' => 3, 'name' => 'Charlie', 'age' => 22],
            ['id' => 4, 'name' => 'David', 'age' => 28]
            ];
            // 使用array_filter提取id=2的数据
            $filteredArray = array_filter($twoDArray, function($item) {
                return in_array($item['id'], [2,3])  && $item['age'] > 25;
            });
            print_r($filteredArray);exit;

            $ids = array_column($twoDArray, 'id'); // 使用array_column提取id字段
            $uniqueIds = array_unique($ids); // 使用array_unique去重
            print_r($uniqueIds);exit;
        $res = Upload::uploadFile($request);
        if (isset($res['code']) && $res['code'] == 0) {
            echo $res['path'];
        }
       
        echo date('Y-m-d H:i:s',strtotime('+'.(2*7).' day'));exit;
        var_dump(TimerRange::getThisMonth());

        WxAccountMsg::dispatch(['aaa','bbb'])
        ->delay(now()->addSeconds(60));exit;

        echo mktime(0,0,0,6,-0,2024);
        DateLunar::getLunarDate('2023-12-16');exit;
        // echo 'aa111';
        // ob_clean();
        $row=[['列A','列B','列C','列D']];
        $options=[
            'A'=>['A1','A2','A3','A4'],
            'D'=>['D1','D2','D3','D4']
        ];
        $datawith = [
            'A' => '30',
            'B' => '30',
            'C' => '90',
        ];
        $filename = 'test123.xlsx';
        return Excel::download(new DownloadTemp($row,$options,$datawith), $filename);
        // $file = storage_path() . '\uploadlocalfile\202405\test1234.xlsx';
        //     $data = Excel::toArray(null, $file)[0];//获取sheet1
        //     print_r($data);exit;
    }


    public function dostoremenu(){
        //菜单导入
$str='[{"path":"/psellStock","keyIndex":"TopNav","meta":{"title":"进销存管理","icon":"logininfo"},"children":[{"path":"/commodityMange","component":"Layout","hidden":false,"meta":{"title":"商品管理","icon":"clipboard"},"name":"commodityMange","children":[{"path":"goodsWarehousing","component":"/manager/psellStock/commodityMange/goodsWarehousing","hidden":false,"meta":{"title":"商品入库列表","buttonList":["撤审","快速审核","批量审核","新品入库","导入","模板下载","导出数据","打印入库单","打印标签","付款"]},"name":"goodsWarehousing"},{"path":"goodsReplenishment","component":"/manager/psellStock/commodityMange/goodsReplenishment","hidden":false,"meta":{"title":"商品补货列表","buttonList":["商品补货单","导入","模板下载","导出数据","打印标签","打印"]},"name":"goodsReplenishment"},{"path":"goodsWarehousingDetail","component":"/manager/psellStock/commodityMange/goodsWarehousingDetail","hidden":false,"meta":{"title":"商品入库列表明细","buttonList":["导出数据"]},"name":"goodsWarehousingDetail"},{"path":"goodsAllocation","component":"/manager/psellStock/commodityMange/goodsAllocation","hidden":false,"meta":{"title":"商品调拨","buttonList":["新增","导出数据","编辑","打印","取消"]},"name":"goodsAllocation"},{"path":"goodsReturn","component":"/manager/psellStock/commodityMange/goodsReturn","hidden":false,"meta":{"title":"商品返厂","buttonList":["新增","批量导入","下载模板","打印明细","全审","处理","删除","查看明细"]},"name":"goodsReturn"},{"path":"inventoryList","component":"/manager/psellStock/commodityMange/inventoryList","hidden":false,"meta":{"title":"商品库存列表","buttonList":["商品添加","批量修改","下载模板","打印标签","批量删除","导出数据","编辑","转旧料","查看"]},"name":"inventoryList"},{"path":"goodsTotalInventory","component":"/manager/psellStock/commodityMange/goodsTotalInventory","hidden":false,"meta":{"title":"商品总库存","buttonList":["导出数据","处理","查看"]},"name":"goodsTotalInventory"},{"path":"commodityFlow","component":"/manager/psellStock/commodityMange/commodityFlow","hidden":false,"meta":{"title":"商品流水","buttonList":["导出数据"]},"name":"commodityFlow"},{"path":"amendantRecord","component":"/manager/psellStock/commodityMange/amendantRecord","hidden":false,"meta":{"title":"商品修改记录列表","buttonList":["导出数据"]},"name":"amendantRecord"}]},{"path":"/orderMange","component":"Layout","hidden":false,"meta":{"title":"订单管理","icon":"shopping"},"name":"orderMange","children":[{"path":"paymentMethod","component":"/manager/psellStock/orderMange/paymentMethod","hidden":false,"meta":{"title":"开单方式","buttonList":[]},"name":"paymentMethod"},{"path":"shopOrder","component":"/manager/psellStock/orderMange/shopOrder","hidden":false,"meta":{"title":"商品订单列表","buttonList":["红冲","导出","计算毛利","编辑","打印","审核","取消"]},"name":"shopOrder"},{"path":"pendingOrder","component":"/manager/psellStock/orderMange/pendingOrder","hidden":false,"meta":{"title":"挂单箱","buttonList":["导出数据","批量支付","支付","取消"]},"name":"pendingOrder"},{"path":"redPunchList","component":"/manager/psellStock/orderMange/redPunchList","hidden":false,"meta":{"title":"红冲列表","buttonList":["导出数据","编辑","审核","取消"]},"name":"redPunchList"},{"path":"orderDetailList","component":"/manager/psellStock/orderMange/orderDetailList","hidden":false,"meta":{"title":"订单明细","buttonList":["导出数据"]},"name":"orderDetailList"},{"path":"exchangeDetailsList","component":"/manager/psellStock/orderMange/exchangeDetailsList","hidden":false,"meta":{"title":"换货明细","buttonList":["导出数据"]},"name":"exchangeDetailsList"}]},{"path":"/usedMaterialsManagement","component":"Layout","hidden":false,"meta":{"title":"旧料管理","icon":"swagger"},"name":"usedMaterialsManagement","children":[{"path":"oldMaterialTotalInventory","component":"/manager/psellStock/usedMaterialsManagement/oldMaterialTotalInventory","hidden":false,"meta":{"title":"旧料总库存","buttonList":["导出数据","处理","查看"]},"name":"oldMaterialTotalInventory"},{"path":"usedStock","component":"/manager/psellStock/usedMaterialsManagement/usedStock","hidden":false,"meta":{"title":"旧料库存","buttonList":["打印明细","导出数据","编辑","上柜"]},"name":"usedStock"},{"path":"usedMaterialsTransfer","component":"/manager/psellStock/usedMaterialsManagement/usedMaterialsTransfer","hidden":false,"meta":{"title":"旧料调拨","buttonList":["新增调拨单","打印明细","导出数据","查看明细","删除"]},"name":"usedMaterialsTransfer"},{"path":"oldMaterialReturn","component":"/manager/psellStock/usedMaterialsManagement/oldMaterialReturn","hidden":false,"meta":{"title":"旧料返厂","buttonList":["新增返厂单","打印明细","导出数据","查看明细","删除"]},"name":"oldMaterialReturn"},{"path":"usedMaterialFlow","component":"/manager/psellStock/usedMaterialsManagement/usedMaterialFlow","hidden":false,"meta":{"title":"旧料流水","buttonList":["导出数据"]},"name":"usedMaterialFlow"},{"path":"oldStock","component":"/manager/psellStock/usedMaterialsManagement/oldStock","hidden":false,"meta":{"title":"存入旧料","buttonList":["新增","导入","下载模板"]},"name":"oldStock"}]},{"path":"/giftManagement","component":"Layout","hidden":false,"meta":{"title":"赠品管理","icon":"international"},"name":"giftManagement","children":[{"path":"giftList","component":"/manager/psellStock/giftManagement/giftList","hidden":false,"meta":{"title":"赠品入库列表","buttonList":["赠品添加","打印","导入","下载模版","导出数据","编辑","审核","取消","删除"]},"name":"giftList"},{"path":"giftAllocationReview","component":"/manager/psellStock/giftManagement/giftAllocationReview","hidden":false,"meta":{"title":"赠品调拨审核","buttonList":["批量审核","导出数据","审核","取消"]},"name":"giftAllocationReview"},{"path":"giftInventoryList","component":"/manager/psellStock/giftManagement/giftInventoryList","hidden":false,"meta":{"title":"赠品库存列表","buttonList":["导出数据","调拨"]},"name":"giftInventoryList"},{"path":"giftFlow","component":"/manager/psellStock/giftManagement/giftFlow","hidden":false,"meta":{"title":"赠品流水列表","buttonList":["导出数据"]},"name":"giftFlow"}]},{"path":"/checkManagement","component":"Layout","hidden":false,"meta":{"title":"盘点管理","icon":"education"},"name":"checkManagement","children":[{"path":"checkList","component":"/manager/psellStock/checkManagement/checkList","hidden":false,"meta":{"title":"盘点列表","buttonList":["盘点计划添加","未盘点导出数据","盘点明细","电脑盘点","删除","已盘导出数据","部分盘导出数据","已盘报表","未盘报表","续盘"]},"name":"checkList"}]}]},{"path":"/marketing","keyIndex":"TopNav","meta":{"title":"会员营销管理","icon":"logininfo"},"children":[{"path":"/memberList","component":"Layout","hidden":false,"meta":{"title":"会员列表","icon":"theme"},"name":"memberList","redirect":"/memberList/memberListIndex","children":[{"path":"memberListIndex","component":"/manager/marketing/memberList/index","hidden":false,"meta":{"title":"会员列表","buttonList":["添加会员","模板下载","导出","导入","一键转出","批量清空积分","批量删除","解绑","编辑会员"]},"name":"memberListIndex"}]},{"path":"/calender","component":"Layout","hidden":false,"meta":{"title":"消费记录","icon":"list"},"name":"calender","children":[{"path":"calenderView","component":"/manager/marketing/calender/index","hidden":false,"meta":{"title":"消费记录","buttonList":["导入","模板下载","导出"]},"name":"calenderView"}]},{"path":"/integral","component":"Layout","hidden":false,"meta":{"title":"积分明细列表","icon":"skill"},"name":"integral","children":[{"path":"integralrView","component":"/manager/marketing/integral/index","hidden":false,"meta":{"title":"积分明细列表","buttonList":["积分添加","导入","模板下载","导出"]},"name":"integralView"}]},{"path":"/prestore","component":"Layout","hidden":false,"meta":{"title":"预存列表","icon":"time-range"},"name":"prestore","children":[{"path":"prestoreView","component":"/manager/marketing/prestore/index","hidden":false,"meta":{"title":"预存列表","buttonList":["打印","导出"]},"name":"prestoreView"}]},{"path":"/pushmessage","component":"Layout","hidden":false,"meta":{"title":"消息推送","icon":"user"},"name":"pushmessage","children":[{"path":"integration","component":"/manager/marketing/pushmessage/integration","hidden":false,"meta":{"title":"积分通知","buttonList":["新增","编辑","发送","删除"]},"name":"integration"},{"path":"shortNotice","component":"/manager/marketing/pushmessage/shortNotice","hidden":false,"meta":{"title":"短息通知","buttonList":["新增","发送","删除"]},"name":"shortNotice"},{"path":"activity","component":"/manager/marketing/pushmessage/activity","hidden":false,"meta":{"title":"活动推送通知","buttonList":["新增","编辑","发送","删除"]},"name":"activity"}]}]},{"path":"/manageForm","keyIndex":"TopNav","meta":{"title":"报表管理","icon":"logininfo"},"children":[{"path":"/commodity","component":"Layout","hidden":false,"meta":{"title":"商品报表","icon":"chart"},"children":[{"path":"storage","component":"/manageForm/commodity/storage","name":"storage","meta":{"title":"库龄分析表","buttonList":["导出","打印"]}},{"path":"salestock","component":"/manageForm/commodity/salestock","name":"salestock","meta":{"title":"进销存报表","buttonList":["导出","打印"]}},{"path":"realtime","component":"/manageForm/commodity/realtime","name":"realtime","meta":{"title":"实时库存表","buttonList":["导出","打印"]}},{"path":"histime","component":"/manageForm/commodity/histime","name":"histime","meta":{"title":"历史库存表","buttonList":["导出","打印"]}},{"path":"giftsummary","component":"/manageForm/commodity/giftsummary","name":"giftsummary","meta":{"title":"赠品汇总","buttonList":["导出","打印"]}},{"path":"inventorywarn","component":"/manageForm/commodity/inventorywarn","name":"inventorywarn","meta":{"title":"库存预警表","buttonList":["导出","新增","编辑","删除"]}}]},{"path":"/operating","component":"Layout","hidden":false,"meta":{"title":"营业报表","icon":"cascader"},"children":[{"path":"businesssummary","component":"/manageForm/operating/businesssummary","name":"businesssummary","meta":{"title":"营业汇总表","buttonList":["导出","打印"]}},{"path":"otherrevenue","component":"/manageForm/operating/otherrevenue","name":"otherrevenue","meta":{"title":"其他收支表","buttonList":["新增","导出","打印"]}},{"path":"grossmargin","component":"/manageForm/operating/grossmargin","name":"grossmargin","meta":{"title":"毛利表","buttonList":["导出","打印"]}},{"path":"oldprofit","component":"/manageForm/operating/oldprofit","name":"oldprofit","meta":{"title":"旧料统计表","buttonList":["导出","打印"]}},{"path":"salesparticular","component":"/manageForm/operating/salesparticular","name":"salesparticular","meta":{"title":"销售明细报表","buttonList":["导出","打印"]}},{"path":"salesperformance","component":"/manageForm/operating/salesperformance","name":"salesperformance","meta":{"title":"销售业绩表","buttonList":["导出","查看明细"]}},{"path":"salescommissions","component":"/manageForm/operating/salescommissions","name":"salescommissions","meta":{"title":"销售提成表","buttonList":[]}}]},{"path":"/finance","component":"Layout","hidden":false,"meta":{"title":"财务报表","icon":"clipboard"},"children":[{"path":"rate","component":"/manageForm/finance/rate","name":"rate","meta":{"title":"费率表","buttonList":["导出","打印","新增","编辑","删除"]}},{"path":"subject","component":"/manageForm/finance/subject","name":"subject","meta":{"title":"科目管理","buttonList":["导出","打印","新增","编辑","删除"]}},{"path":"cash","component":"/manageForm/finance/cash","name":"cash","meta":{"title":"现金日记账","buttonList":["导出","新增","编辑","删除"]}},{"path":"bank","component":"/manageForm/finance/bank","name":"bank","meta":{"title":"银行日记账","buttonList":["导出","新增","编辑","删除"]}},{"path":"valuecard","component":"/manageForm/finance/valuecard","name":"valuecard","meta":{"title":"储值卡","buttonList":["导出","新增","编辑","删除"]}},{"path":"property","component":"/manageForm/finance/property","name":"property","meta":{"title":"资产负债表","buttonList":["导出","打印"]}},{"path":"profit","component":"/manageForm/finance/profit","name":"profit","meta":{"title":"利润表","buttonList":["导出","打印","完善报表"]}}]}]},{"path":"/basicSetting","keyIndex":"TopNav","meta":{"title":"基础设置","icon":"logininfo"},"children":[{"path":"/basicBank","component":"Layout","hidden":false,"meta":{"title":"基本资料","icon":"documentation"},"children":[{"path":"gold","component":"/manager/basic/bank/gold","name":"gold","meta":{"title":"金价管理列表","buttonList":["新增","编辑","删除","批量新增","金价维护","导出","复制数据"]}},{"path":"group","component":"/manager/basic/bank/group","name":"group","meta":{"title":"柜组列表","buttonList":["新增","编辑","删除","导入","模板下载"]}},{"path":"merch","component":"/manager/basic/bank/merch","name":"merch","meta":{"title":"商品类别列表","buttonList":["新增","编辑","删除","导入","模板下载"]}},{"path":"shopstyle","component":"/manager/basic/bank/shopstyle","name":"shopstyle","meta":{"title":"商品款式列表","buttonList":["新增","编辑","删除","导入","模板下载"]}},{"path":"metal","component":"/manager/basic/bank/metal","name":"metal","meta":{"title":"金属材质列表","buttonList":["新增","编辑","删除"]}},{"path":"technology","component":"/manager/basic/bank/technology","name":"technology","meta":{"title":"商品工艺列表","buttonList":["新增","编辑","删除","导入","模板下载"]}},{"path":"grade","component":"/manager/basic/bank/grade","name":"grade","meta":{"title":"会员等级列表","buttonList":["新增","编辑"]}},{"path":"pricetype","component":"/manager/basic/bank/pricetype","name":"pricetype","meta":{"title":"价格类型列表","buttonList":["新增","编辑","删除"]}},{"path":"brandlist","component":"/manager/basic/bank/brandlist","name":"brandlist","meta":{"title":"品牌名单列表","buttonList":["新增","编辑","删除"]}},{"path":"payinouttype","component":"/manager/basic/bank/payinouttype","name":"payinouttype","meta":{"title":"收支类型列表","buttonList":["新增","编辑","删除","导入","模板下载"]}},{"path":"ordernote","component":"/manager/basic/bank/ordernote","name":"ordernote","meta":{"title":"订单备注列表","buttonList":["新增","编辑","删除"]}},{"path":"stone","component":"/manager/basic/bank/stone","name":"stone","meta":{"title":"石料材质列表","buttonList":["新增","编辑","删除"]}},{"path":"pricing","component":"/manager/basic/bank/pricing","name":"pricing","meta":{"title":"标价计算公式列表","buttonList":[]}},{"path":"returntype","component":"/manager/basic/bank/returntype","name":"returntype","meta":{"title":"返厂类型列表","buttonList":["新增","编辑","删除"]}},{"path":"supplier","component":"/manager/basic/bank/supplier","name":"supplier","meta":{"title":"供应商","buttonList":["新增","编辑","删除"]}}]},{"path":"/templatefile","component":"Layout","hidden":false,"meta":{"title":"模板","icon":"swagger"},"children":[{"path":"pledgebond","component":"/manager/basic/templatefile/pledgebond","name":"pledgebond","meta":{"title":"质保单模板","buttonList":["新增","设计","复制","编辑","删除","导入","模板下载","导出"]}},{"path":"labeltag","component":"/manager/basic/templatefile/labeltag","name":"labeltag","meta":{"title":"标签模板","buttonList":["新增","设计","复制","编辑","删除","导入","模板下载","导出"]}}]},{"path":"/basicShoptype","component":"Layout","hidden":false,"meta":{"title":"商品类型","icon":"tab"},"children":[{"path":"shoptype","component":"/manager/basic/shoptype/index","name":"shoptype","meta":{"title":"商品类型","buttonList":["新增","编辑","删除"]}}]},{"path":"/basicPaytype","component":"Layout","hidden":false,"meta":{"title":"支付方式","icon":"server"},"children":[{"path":"paytype","component":"/manager/basic/paytype/index","name":"paytype","meta":{"title":"支付方式","buttonList":["新增","编辑","删除"]}}]}]},{"path":"/accountManage","keyIndex":"TopNav","meta":{"title":"账号管理","icon":"logininfo"},"children":[{"path":"/publicMypanel","component":"Layout","hidden":false,"meta":{"title":"我的面板","icon":"people"},"children":[{"path":"publicMypanelM","component":"/public/mypanel/message","name":"publicMypanelM","meta":{"title":"个人信息","icon":"logininfor"}},{"path":"publicMypanelP","component":"/public/mypanel/password","name":"publicMypanelP","meta":{"title":"修改密码","icon":"logininfor"}}]},{"path":"/limits","component":"Layout","hidden":false,"meta":{"title":"权限管理","icon":"system"},"children":[{"path":"personlimits","component":"/manager/accountManage/limits/personlimits","name":"personlimits","meta":{"title":"人员管理","icon":"logininfor","buttonList":["新增","分配权限","编辑","删除","重置密码"]}},{"path":"section","component":"/manager/accountManage/limits/section","name":"section","meta":{"title":"部门管理","icon":"logininfor","buttonList":[]}}]}]},{"path":"/setSystem","keyIndex":"TopNav","meta":{"title":"系统设置","icon":"logininfo"},"children":[{"path":"/rechargeParameterSetting","component":"Layout","hidden":false,"meta":{"title":"充值参数设置","icon":"drag"},"name":"rechargeParameterSetting","children":[{"path":"preStoredRechargeSettings","component":"/manager/systemSettings/rechargeParameterSetting/preStoredRechargeSettings","name":"preStoredRechargeSettings","meta":{"title":"预存充值设置","buttonList":["新增","编辑","删除"]}}]},{"path":"/commissionSetting","component":"Layout","hidden":false,"meta":{"title":"提成规则设置","icon":"example"},"name":"commissionSetting","children":[{"path":"discountCommission","component":"/manager/systemSettings/commissionSetting/discountCommission","name":"discountCommission","meta":{"title":"折扣提成","buttonList":["新增","编辑","删除"]}},{"path":"preferentialCommission","component":"/manager/systemSettings/commissionSetting/preferentialCommission","name":"preferentialCommission","meta":{"title":"优惠提成","buttonList":["新增","编辑","删除"]}},{"path":"goldWorkFeeCommission","component":"/manager/systemSettings/commissionSetting/goldWorkFeeCommission","name":"goldWorkFeeCommission","meta":{"title":"金价工费提成","buttonList":["新增","编辑","删除"]}},{"path":"exchangeCommission","component":"/manager/systemSettings/commissionSetting/exchangeCommission","name":"exchangeCommission","meta":{"title":"换货提成","buttonList":["新增","编辑","删除"]}},{"path":"depositRecycleCommission","component":"/manager/systemSettings/commissionSetting/depositRecycleCommission","name":"depositRecycleCommission","meta":{"title":"纯回收提成","buttonList":["新增","编辑","删除"]}}]},{"path":"/shiftSetting","component":"Layout","hidden":false,"meta":{"title":"班次设置","icon":"guide"},"children":[{"path":"shiftSettingIndex","component":"/manager/systemSettings/shiftSetting/index","name":"shiftSettingIndex","meta":{"title":"班次设置","buttonList":["新增","编辑","删除"]}}]},{"path":"/integrationRuleSetting","component":"Layout","hidden":false,"meta":{"title":"积分规则设置","icon":"money"},"name":"integrationRuleSetting","children":[{"path":"integralSetting","component":"/manager/systemSettings/integrationRuleSetting/integralSetting","name":"integralSetting","meta":{"title":"积分设置","buttonList":["新增","编辑","删除"]}},{"path":"checkInScore","component":"/manager/systemSettings/integrationRuleSetting/checkInScore","name":"checkInScore","meta":{"title":"签到积分","buttonList":["新增","编辑","删除"]}},{"path":"signinusemoney","component":"/manager/systemSettings/integrationRuleSetting/signinusemoney","name":"signinusemoney","meta":{"title":"使用金额","buttonList":["保存"]}}]},{"path":"/user-store","component":"Layout","hidden":false,"meta":{"title":"门店列表","icon":"documentation"},"children":[{"path":"userStoreIndex","component":"/manager/systemSettings/store/index","name":"userStoreIndex","meta":{"title":"门店列表","buttonList":["关闭增值回收","开启增值回收","导出"]}}]},{"path":"/sysRenew","component":"Layout","hidden":false,"meta":{"title":"续费管理","icon":"guide"},"children":[{"path":"sysRenewIndex","component":"/manager/systemSettings/renew/index","name":"sysRenewIndex","meta":{"title":"续费管理","buttonList":["续费设置"]}}]},{"path":"/logManagement","component":"Layout","hidden":false,"meta":{"title":"日志管理","icon":"list"},"name":"logManagement","children":[{"path":"operationLog","component":"/manager/systemSettings/logManagement/operationLog","name":"operationLog","meta":{"title":"操作日志","buttonList":["删除"]}},{"path":"entryLog","component":"/manager/systemSettings/logManagement/entryLog","name":"entryLog","meta":{"title":"登录日志","buttonList":["删除"]}}]}]},{"path":"/videoAam","keyIndex":"TopNav","meta":{"title":"视频管理","icon":"logininfo"},"children":[{"path":"/opertionVideo","component":"Layout","hidden":false,"meta":{"title":"视频管理","icon":"eye-open"},"children":[{"path":"video","component":"/opertion/video/index","name":"video","meta":{"title":"视频教程","buttonList":["上传视频"]}}]}]},{"path":"/mmpAam","keyIndex":"TopNav","meta":{"title":"小程序管理","icon":"logininfo"},"children":[{"path":"/electronic","component":"Layout","hidden":false,"meta":{"title":"电子券管理","icon":"star"},"children":[{"path":"electronicIndex","component":"/miniProgram/electronic/index","name":"electronicIndex","meta":{"title":"电子券管理","buttonList":["电子券添加","发放明细","删除"]}}]},{"path":"/present","component":"Layout","hidden":false,"name":"present","meta":{"title":"礼品管理","icon":"shopping"},"children":[{"path":"presentStockList","component":"/miniProgram/present/presentStockList","name":"presentStockList","meta":{"title":"礼品库存列表","buttonList":["礼品添加","导入","下载模板","打印标签","删除","调拨","编辑","查看流水","入库","审核","取消"]}},{"path":"presentAllotList","component":"/miniProgram/present/presentAllotList","name":"presentAllotList","meta":{"title":"礼品调拨列表","buttonList":["审核","取消"]}},{"path":"presentConversionList","component":"/miniProgram/present/presentConversionList","name":"presentConversionList","meta":{"title":"礼品兑换列表","buttonList":["导出数据","兑换"]}},{"path":"presentFlowList","component":"/miniProgram/present/presentFlowList","name":"presentFlowList","meta":{"title":"礼品流水列表","buttonList":["导出数据"]}},{"path":"presentCategoryList","component":"/miniProgram/present/presentCategoryList","name":"presentCategoryList","meta":{"title":"礼品库类别列表","buttonList":["添加礼品类别","编辑","删除"]}}]},{"path":"/wxSwipper","component":"Layout","hidden":false,"meta":{"title":"轮播图管理","icon":"date"},"children":[{"path":"wxSwipperIndex","component":"/miniProgram/swipper/index","name":"wxSwipperIndex","meta":{"title":"轮播图管理","buttonList":["新增","删除"]}}]},{"path":"/weixin","component":"Layout","hidden":false,"meta":{"title":"微信平台配置","icon":"wechat"},"children":[{"path":"weixinIndex","component":"/miniProgram/weixin/index","name":"weixinIndex","meta":{"title":"微信平台配置","buttonList":["保存"]}}]},{"path":"/official","component":"Layout","hidden":false,"meta":{"title":"公众号配置","icon":"validCode"},"children":[{"path":"officialIndex","component":"/miniProgram/official/index","name":"officialIndex","meta":{"title":"公众号配置","buttonList":["保存","微信推送保存"]}}]},{"path":"/SMSConfiguration","component":"Layout","hidden":false,"meta":{"title":"短信配置","icon":"email"},"children":[{"path":"SMSConfigurationIndex","component":"/miniProgram/SMSConfiguration/index","name":"SMSConfigurationIndex","meta":{"title":"短信配置","buttonList":["短息配置保存","短息模板配置保存"]}}]},{"path":"/warrantycard","component":"Layout","hidden":false,"meta":{"title":"质保单设置","icon":"education"},"children":[{"path":"hint","component":"/miniProgram/warrantycard/hint","name":"hint","meta":{"title":"温馨提示内容编辑","buttonList":["保存"]}},{"path":"sale","component":"/miniProgram/warrantycard/sale","name":"sale","meta":{"title":"售后服务承诺编辑","buttonList":["保存"]}},{"path":"electronic","component":"/miniProgram/warrantycard/electronic","name":"electronic","meta":{"title":"电子章","buttonList":["新增","开关"]}}]}]}]';
        $str_arr=json_decode($str,true);
        print_r($str_arr);exit;
        foreach ($str_arr as $val) {
            $data = [
                'path' => $val['path'],
                'name' => isset($val['name'])?$val['name']:'',
                'component' => isset($val['component'])?$val['component']:'',
                'hidden' => 0,
                'title' => $val['meta']['title'],
                'icon' => isset($val['meta']['icon'])?$val['meta']['icon']:'',
                'props'=>isset($val['props'])?json_encode($val['props']):'',
                'keyIndex'=>isset($val['keyIndex'])?$val['keyIndex']:'',
            ];
            $pid = AccountMenu::create($data)->id;
            if (isset($val['children'])) {
                foreach ($val['children'] as $children) {
                    $subdata = [
                        'path' => $children['path'],
                        'pid' => $pid,
                        'name' => isset($children['name'])?$children['name']:'',
                        'component' => $children['component'],
                        'hidden' => 0,
                        'title' => $children['meta']['title'],
                        'icon' => isset($children['meta']['icon'])?$children['meta']['icon']:'',
                        'props'=>isset($children['props'])?json_encode($children['props']):'',
                    ];
                    $ppid = AccountMenu::create($subdata)->id;

                    if (isset($children['meta']['buttonList'])) {
                        foreach ($children['meta']['buttonList'] as $button) {
                            $buttondata = [
                                'pid' => $ppid,
                                'name' => $button,
                                'is_botton' => 1
                            ];
                            AccountMenu::create($buttondata);
                        }
                    }

                    if (isset($children['children'])) {
                        foreach ($children['children'] as $childrenchildren) {
                            $subsubdata = [
                                'path' => $childrenchildren['path'],
                                'pid' => $ppid,
                                'name' => $childrenchildren['name'],
                                'component' => $childrenchildren['component'],
                                'hidden' => 0,
                                'title' => $childrenchildren['meta']['title'],
                                'icon' => isset($childrenchildren['meta']['icon'])?$childrenchildren['meta']['icon']:'',
                                'props'=>isset($childrenchildren['props'])?json_encode($childrenchildren['props']):'',
                            ];
                            $pppid = AccountMenu::create($subsubdata)->id;

                            if (isset($childrenchildren['meta']['buttonList'])) {
                                foreach ($childrenchildren['meta']['buttonList'] as $button) {
                                    $buttondata = [
                                        'pid' => $pppid,
                                        'name' => $button,
                                        'is_botton' => 1
                                    ];
                                    AccountMenu::create($buttondata);
                                }
                            }
                        }
                    }
                }
            }

            if (isset($val['meta']['buttonList'])) {
                foreach ($val['meta']['buttonList'] as $button) {
                    $buttondata = [
                        'pid' => $pid,
                        'name' => $button,
                        'is_botton' => 1
                    ];
                    AccountMenu::create($buttondata);
                }
            }
        }
    }


    public function doadminmenu(){
        //超管菜单导入
        exit;
        $str='[{"path":"/adminN","component":"Layout","hidden":false,"meta":{"title":"账号管理","icon":"input"},"children":[{"path":"adminNumber","component":"/admin/adminNumber/index","name":"adminNumber","meta":{"title":"账号管理"}}]},{"path":"/adminO","component":"Layout","hidden":false,"meta":{"title":"运维管理","icon":"form"},"children":[{"path":"adminOam","component":"/admin/adminOam/index","name":"adminOam","meta":{"title":"运维管理","buttonList":["新增","编辑","冻结","重置密码"]}}]},{"path":"/adminS","component":"Layout","hidden":false,"meta":{"title":"轮播图管理","icon":"date"},"children":[{"path":"adminSwipper","component":"/admin/adminSwipper/index","name":"adminSwipper","meta":{"title":"轮播图管理","buttonList":["新增","删除"]}}]},{"path":"/adminB","component":"Layout","hidden":false,"meta":{"title":"公告管理","icon":"message"},"children":[{"path":"adminBoard","component":"/admin/adminBoard/index","name":"adminBoard","meta":{"title":"公告管理","icon":"message","buttonList":["新增","编辑","删除","发送"]}}]},{"path":"/adminP","component":"Layout","hidden":false,"meta":{"title":"常见问题","icon":"search"},"children":[{"path":"adminProblem","component":"/admin/adminProblem/index","name":"adminProblem","meta":{"title":"常见问题","buttonList":["新增","编辑","删除","发送"]}}]},{"path":"/adminA","component":"Layout","hidden":false,"meta":{"title":"账户管理","icon":"tool"},"children":[{"path":"adminAccount","component":"/admin/adminAccount/index","name":"adminAccount","meta":{"title":"账户管理","buttonList":["新增","编辑"]}}]},{"path":"/publicMypanel","component":"Layout","hidden":false,"meta":{"title":"我的面板","icon":"logininfor"},"children":[{"path":"publicMypanelM","component":"/public/mypanel/message","name":"publicMypanelM","meta":{"title":"个人信息"}},{"path":"publicMypanelP","component":"/public/mypanel/password","name":"publicMypanelP","meta":{"title":"修改密码"}}]},{"path":"/opertionSalesman","component":"Layout","hidden":false,"meta":{"title":"业务员管理","icon":"lock"},"children":[{"path":"salesman","component":"/opertion/salesman/index","name":"salesman","meta":{"title":"业务员管理","buttonList":["新增","编辑"]}}]},{"path":"/opertionService","component":"Layout","hidden":false,"meta":{"title":"客服管理","icon":"people"},"children":[{"path":"service","component":"/opertion/service/index","name":"service","meta":{"title":"客服管理","buttonList":["新增","编辑"]}}]},{"path":"/opertionBrand","component":"Layout","hidden":false,"meta":{"title":"品牌管理","icon":"row"},"children":[{"path":"brand","component":"/opertion/brand/index","name":"brand","meta":{"title":"品牌管理","buttonList":["新增","编辑"]}}]},{"path":"/adminUser","component":"Layout","hidden":false,"meta":{"title":"用户管理","icon":"excel"},"children":[{"path":"adminUserComp","component":"/admin/adminUser/comp","name":"adminUserComp","meta":{"title":"用户公司列表","buttonList":["新增","编辑","重置密码","导出","审核","添加门店"]}},{"path":"adminUserShop","component":"/admin/adminUser/shop","name":"adminUserShop","meta":{"title":"用户门店列表","buttonList":["编辑","导出","添加合同"]}},{"path":"adminUserRenew","component":"/admin/adminUser/renew","name":"adminUserRenew","meta":{"title":"用户公司续费管理","buttonList":["确认","导出"]}}]},{"path":"/finance","component":"Layout","hidden":false,"meta":{"title":"财务报表","icon":"clipboard"},"children":[{"path":"rate","component":"/manageForm/finance/rate","name":"rate","meta":{"title":"费率表","buttonList":["导出","打印","新增","编辑","删除"]}},{"path":"subject","component":"/manageForm/finance/subject","name":"subject","meta":{"title":"科目管理","buttonList":["导出","打印","新增","编辑","删除"]}},{"path":"cash","component":"/manageForm/finance/cash","name":"cash","meta":{"title":"现金日记账","buttonList":["导出","新增","编辑","删除"]}},{"path":"bank","component":"/manageForm/finance/bank","name":"bank","meta":{"title":"银行日记账","buttonList":["导出","新增","编辑","删除"]}},{"path":"property","component":"/manageForm/finance/property","name":"property","meta":{"title":"资产负债表","buttonList":["导出","打印"]}},{"path":"profit","component":"/manageForm/finance/profit","name":"profit","meta":{"title":"利润表","buttonList":["导出","打印"]}}]},{"path":"/auditOa","component":"Layout","hidden":false,"meta":{"title":"OA审批","icon":"skill"},"children":[{"path":"auditshop","component":"/admin/auditOa/auditshop","name":"auditshop","meta":{"title":"门店OA审批列表","buttonList":["审核","取消","导出"]}},{"path":"auditcontract","component":"/admin/auditOa/auditcontract","name":"auditcontract","meta":{"title":"合同审批列表","buttonList":["审核","取消","导出"]}}]},{"path":"/opertionVideo","component":"Layout","hidden":false,"meta":{"title":"视频管理","icon":"eye-open"},"children":[{"path":"video","component":"/opertion/video/index","name":"video","meta":{"title":"视频教程","buttonList":["上传视频"]}}]}]';
        $str_arr=json_decode($str,true);
        // print_r($str_arr);exit;
            foreach ($str_arr as $val) {
                $data = [
                    'path' => $val['path'],
                    'name' => isset($val['name'])?$val['name']:'',
                    'component' => $val['component'],
                    'hidden' => 0,
                    'title' => $val['meta']['title'],
                    'icon' => isset($val['meta']['icon'])?$val['meta']['icon']:'',
                    'props'=>isset($val['props'])?json_encode($val['props']):'',
                ];
                $pid = AdminMenu::create($data)->id;
                if (isset($val['children'])) {
                    foreach ($val['children'] as $children) {
                        $subdata = [
                            'path' => $children['path'],
                            'pid' => $pid,
                            'name' => $children['name'],
                            'component' => $children['component'],
                            'hidden' => 0,
                            'title' => $children['meta']['title'],
                            'icon' => isset($children['meta']['icon'])?$children['meta']['icon']:'',
                            'props'=>isset($children['props'])?json_encode($children['props']):'',
                        ];
                        $ppid = AdminMenu::create($subdata)->id;

                        if (isset($children['meta']['buttonList'])) {
                            foreach ($children['meta']['buttonList'] as $button) {
                                $buttondata = [
                                    'pid' => $ppid,
                                    'name' => $button,
                                    'is_botton' => 1
                                ];
                                AdminMenu::create($buttondata);
                            }
                        }

                        if (isset($children['children'])) {
                            foreach ($children['children'] as $childrenchildren) {
                                $subsubdata = [
                                    'path' => $childrenchildren['path'],
                                    'pid' => $ppid,
                                    'name' => $childrenchildren['name'],
                                    'component' => $childrenchildren['component'],
                                    'hidden' => 0,
                                    'title' => $childrenchildren['meta']['title'],
                                    'icon' => isset($childrenchildren['meta']['icon'])?$childrenchildren['meta']['icon']:'',
                                    'props'=>isset($childrenchildren['props'])?json_encode($childrenchildren['props']):'',
                                ];
                                $pppid = AdminMenu::create($subsubdata)->id;

                                if (isset($childrenchildren['meta']['buttonList'])) {
                                    foreach ($childrenchildren['meta']['buttonList'] as $button) {
                                        $buttondata = [
                                            'pid' => $pppid,
                                            'name' => $button,
                                            'is_botton' => 1
                                        ];
                                        AdminMenu::create($buttondata);
                                    }
                                }
                            }
                        }
                    }
                }

                if (isset($val['meta']['buttonList'])) {
                    foreach ($val['meta']['buttonList'] as $button) {
                        $buttondata = [
                            'pid' => $pid,
                            'name' => $button,
                            'is_botton' => 1
                        ];
                        AdminMenu::create($buttondata);
                    }
                }
            }



    }


}